package model

type DemoOrder struct {
	OrderNo string    `gorm:"primaryKey"`                  //`json:"order_no" gorm:"column:order_no;primaryKey;autoIncrement"`
	UserName string
	Amount float64
	Status string
	FileUrl string
}

/*
	type DemoOrder struct {
	ID int 				`gorm:"AUTO_INCREMENT;primaryKey"`
	Name string			`gorm:"json:'name'"`
	OrderNo string		`json:"order_no,json:'order_no'"`
	UserName string		`gorm:"default:'zhangsan',json:'user_name'"`
	Amount float64		`json:"amount"`
	Status string		`gorm:"json:'status'"`
	FileUrl string		`gorm:"json:'file_url'"`
}
*/
func NewDemoOrder(orderNo string, userName string, amount float64, status string, fileUrl string) *DemoOrder {
	return &DemoOrder{OrderNo: orderNo, UserName: userName, Amount: amount, Status: status, FileUrl: fileUrl}
}